/*
    esp.me -- MakeMe for Embedded Server Pages
 */

Me.load({
    targets: {
        'esp.h': {
            type: 'header',
            headers: [ '*.h' ],
        },

        libesp: {
            type: 'lib',
            depends: [ 'sqlite', 'libhttp', 'libmpr-version' ],
            sources: [ '*.c' ],
            headers: [ '*.h' ],
            exclude: /esp\.c/,
        },

        espcmd: {
            pname: 'esp',
            path: '${BIN}/esp${EXE}',
            type: 'exe',
            depends: [ 'sqlite', 'libesp' ],
            sources: [ 'esp.c' ]
            platforms: [ 'local' ],
            postblend: function (target) {
                if (target.static && me.targets.ssl.enable) {
                    target.depends += ['libmprssl']
                }
            },
        },

        extras: {
            type: 'file',
            files: [ 'esp-compile.json', 'vcvars.bat' ],
            path: '${BIN}/',
        }
    }
})
